const {
  Application,
  Container,
  loader,
  Sprite,
  autoDetectRenderer,
  utils,
  Texture,
  Graphics,
  extras
} = PIXI;

let HEIGHT = window.screen.width,
  WIDTH = window.screen.height;

let app = new PIXI.Application(WIDTH, HEIGHT, {
  backgroundColor: 16777215,
  forceCanvas: true
});

document.body.appendChild(app.view);

const bg_arr = [
  'images/new-1-sky-1.jpg',
  'images/new-1-sky-2.jpg',
  'images/new-1-sky-3.jpg',
  'images/new-1-sky-4.jpg',
  'images/new-1-sky-5.jpg',
  'images/new-1-sky-6.jpg',
  'images/new-1-sky-7.jpg',
  'images/new-1-sky-8.jpg',
  'images/new-1-sky-9.jpg',
  'images/new-1-sky-10.jpg',
  'images/new-1-sky-11.jpg',
]

loader
  .add(bg_arr)
  .load(setup);

function setup(e, r) {
  let animate = extras.AnimatedSprite.fromFrames(bg_arr);
  animate.width = 750
  animate.height = 300
  animate.animationSpeed = .1;
  animate.play();
  app.stage.addChild(animate);
}